<template>
    <div id="box">
        <div class="hd">
            <div class="list" v-for="(item,index) in tableArr" :key="index">
                <div :class="types == 2 ? 'names':'name'">{{ types == 2 ? item.enterpriseName : item.developersPropertyName }}</div>
                <div class="count">{{ types == 2 ? item.projectNumber+'家' : item.count+'家' }}</div>
                <div class="proportion">{{ types == 2 ? item.proportion+'%' : item.proportion+'%' }}</div>
            </div>
        </div>
    </div>
</template>
   
<script setup>
import { ref,defineProps,onMounted } from 'vue';
const props = defineProps({
    tableArr: {
    type: Object,
    required: true,
  },
  types:{
    type: Number,
    required: true,
    default:1,
  }
});
onMounted (() => {
})
</script>
<style scoped lang="less">
#box{
    height: 100%;
    
    display: flex;
    justify-content: center;
    position: relative;
    bottom: 15px;
}
.hd{
    display: flex;
    // flex-wrap: wrap;
    // align-items: center;
    // justify-content: center;
    border: 1px solid #074499;
}
.list{
    display: inline-block;
}
.list > div{
    width: 70px;
    height: 25px;
    border: 1px solid #074499;
    padding: 5px 0px;

  
    white-space: nowrap; /* 防止文本换行 */
   overflow: hidden; /* 隐藏超出容器的内容 */
   text-overflow: ellipsis; /* 当文本溢出时显示省略号 */
   justify-content: center;
}

#box > div > div{
    font-size: 14px;
    color: white;
    font-weight: 400;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    
}
.proportion{
    background: rgba(16, 28, 51, 1) !important;
}
.name {
    background: rgba(16, 28, 51, 1) !important;
    justify-content: center !important;
}
.names {
    background: rgba(16, 28, 51, 1) !important;
    justify-content: flex-start !important;
}
</style>